<?php if($this->errMsg) :?>
	<?php $this->showError($this->errMsg)?>
<?php endif; ?>
<?php if($this->msg) :?>		
	<?php $this->showMessage($this->msg)?>	
<?php endif;?>
<?php 
if(($this->typenews))
{
	$hide = "";$show = "";
	if($this->typenews['status'] == 0)
		$hide = "selected";
	else
		$show = "selected";
?>

<form name='form' id='form' action="" method="POST">
	<div class="title_ad"><label><a href="">Sửa loại tin</a></label>
	</div>
	<div class="mydiv">
	<table  class="tb_box">
		<tr>
			<td>
				<label>Mã loại tin</label>
			</td>
			<td>
				<input disabled="disabled" type="text" name ="id" value = "<?php echo $this->typenews['id']?>">
			</td>
			<td>
				<label>Chuyên mục</label>
			</td>
			<td>
				<select name ="forum_id">
					<?php 
					foreach ($this->arrforum as $row)
					{
						$active = "";
						if ($row->id == $this->typenews['forum_id'])
							$active = "selected";
						else 
							$active = "";
						echo("<option ".$active." value='".$row->id."'>".$row->name."</option>");
					}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>
				<label>Tên chuyên mục</label>
			</td>
			<td>
				<input type="text" name ="name" value = "<?php echo $this->typenews['name']?>">
			</td>
			<td>
				<label>Trạng Thái</label>
			</td>
			<td>
			<select name = 'status'>
				<option value = '0' <?php echo $hide?>>Ẩn</option>
				<option value= '1' <?php echo $show?>>Hiện</option>
			</select>
			</td>
		</tr>
	</table>
		<div class="div_button" >	
			<input type="submit" value="Lưu" class="button"/>
			<input type="reset" value="Làm lại" class="button" />
		</div>
	</div>
</form>
<?php 
}
else
	echo("Loại tin này không tồn tại");
?>